package cn.zlj.springcloud.sys.server.controller;

import cn.zlj.springcloud.sys.common.UserInfo;
import cn.zlj.springcloud.sys.server.service.SysUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * @Description
 * @Author ljzhong
 * @Date 2020/4/6
 */
@Controller
@RequestMapping("/user")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;

    @PostMapping("/getUser")
    public UserInfo getUser(@RequestBody String userName){
        System.out.println("========"+userName);
        return sysUserService.findByUsername("admin");
    }
}
